Integrand size = 25, antiderivative size = 65 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a x}{8}-\frac {a \cos ^3(c+d x)}{3 d}+\frac {a \cos (c+d x) \sin (c+d x)}{8 d}-\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d} \]
Time = 0.07 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.65 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a (24 \cos (c+d x)+8 \cos (3 (c+d x))+3 (-4 d x+\sin (4 (c+d x))))}{96 d} \]
Time = 0.38 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.08, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {3042, 3317, 3042, 3045, 15, 3048, 3042, 3115, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sin (c+d x) \cos ^2(c+d x) (a \sin (c+d x)+a) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (c+d x) \cos (c+d x)^2 (a \sin (c+d x)+a)dx\) |
\(\Big \downarrow \) 3317 |
\(\displaystyle a \int \cos ^2(c+d x) \sin ^2(c+d x)dx+a \int \cos ^2(c+d x) \sin (c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \cos (c+d x)^2 \sin (c+d x)dx+a \int \cos (c+d x)^2 \sin (c+d x)^2dx\) |
\(\Big \downarrow \) 3045 |
\(\displaystyle a \int \cos (c+d x)^2 \sin (c+d x)^2dx-\frac {a \int \cos ^2(c+d x)d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 15 |
\(\displaystyle a \int \cos (c+d x)^2 \sin (c+d x)^2dx-\frac {a \cos ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 3048 |
\(\displaystyle a \left (\frac {1}{4} \int \cos ^2(c+d x)dx-\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {a \cos ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \left (\frac {1}{4} \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {a \cos ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a \left (\frac {1}{4} \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )-\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {a \cos ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a \left (\frac {1}{4} \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {a \cos ^3(c+d x)}{3 d}\) |
-1/3*(a*Cos[c + d*x]^3)/d + a*(-1/4*(Cos[c + d*x]^3*Sin[c + d*x])/d + (x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d))/4)
3.3.68.3.1 Defintions of rubi rules used
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_ Symbol] :> Simp[-(a*f)^(-1) Subst[Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] && !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])
Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m _), x_Symbol] :> Simp[(-a)*(b*Cos[e + f*x])^(n + 1)*((a*Sin[e + f*x])^(m - 1)/(b*f*(m + n))), x] + Simp[a^2*((m - 1)/(m + n)) Int[(b*Cos[e + f*x])^n *(a*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, n}, x] && GtQ[m, 1] && NeQ[m + n, 0] && IntegersQ[2*m, 2*n]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a Int[(g*Co s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d Int[(g*Cos[e + f*x])^ p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
Time = 0.15 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.66
method | result | size |
parallelrisch | \(-\frac {a \left (-12 d x +24 \cos \left (d x +c \right )+3 \sin \left (4 d x +4 c \right )+8 \cos \left (3 d x +3 c \right )+32\right )}{96 d}\) | \(43\) |
risch | \(\frac {a x}{8}-\frac {a \cos \left (d x +c \right )}{4 d}-\frac {a \sin \left (4 d x +4 c \right )}{32 d}-\frac {a \cos \left (3 d x +3 c \right )}{12 d}\) | \(48\) |
derivativedivides | \(\frac {a \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )-\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{3}}{d}\) | \(57\) |
default | \(\frac {a \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )-\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{3}}{d}\) | \(57\) |
norman | \(\frac {\frac {a x}{8}-\frac {2 a}{3 d}-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {7 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {7 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {a x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {3 a x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {a x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {a x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}-\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {2 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}\) | \(205\) |
Time = 0.28 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.78 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {8 \, a \cos \left (d x + c\right )^{3} - 3 \, a d x + 3 \, {\left (2 \, a \cos \left (d x + c\right )^{3} - a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d} \]
-1/24*(8*a*cos(d*x + c)^3 - 3*a*d*x + 3*(2*a*cos(d*x + c)^3 - a*cos(d*x + c))*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (56) = 112\).
Time = 0.16 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.83 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=\begin {cases} \frac {a x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {a x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {a x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {a \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} - \frac {a \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} - \frac {a \cos ^{3}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\x \left (a \sin {\left (c \right )} + a\right ) \sin {\left (c \right )} \cos ^{2}{\left (c \right )} & \text {otherwise} \end {cases} \]
Piecewise((a*x*sin(c + d*x)**4/8 + a*x*sin(c + d*x)**2*cos(c + d*x)**2/4 + a*x*cos(c + d*x)**4/8 + a*sin(c + d*x)**3*cos(c + d*x)/(8*d) - a*sin(c + d*x)*cos(c + d*x)**3/(8*d) - a*cos(c + d*x)**3/(3*d), Ne(d, 0)), (x*(a*sin (c) + a)*sin(c)*cos(c)**2, True))
Time = 0.21 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.60 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {32 \, a \cos \left (d x + c\right )^{3} - 3 \, {\left (4 \, d x + 4 \, c - \sin \left (4 \, d x + 4 \, c\right )\right )} a}{96 \, d} \]
Time = 0.31 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.72 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=\frac {1}{8} \, a x - \frac {a \cos \left (3 \, d x + 3 \, c\right )}{12 \, d} - \frac {a \cos \left (d x + c\right )}{4 \, d} - \frac {a \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} \]
Time = 13.34 (sec) , antiderivative size = 198, normalized size of antiderivative = 3.05 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a\,x}{8}+\frac {\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\left (\frac {a\,\left (12\,c+12\,d\,x-48\right )}{24}-\frac {a\,\left (c+d\,x\right )}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-\frac {7\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+\left (\frac {a\,\left (18\,c+18\,d\,x-48\right )}{24}-\frac {3\,a\,\left (c+d\,x\right )}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {7\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}+\left (\frac {a\,\left (12\,c+12\,d\,x-16\right )}{24}-\frac {a\,\left (c+d\,x\right )}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+\frac {a\,\left (3\,c+3\,d\,x-16\right )}{24}-\frac {a\,\left (c+d\,x\right )}{8}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^4} \]
(a*x)/8 + ((a*(3*c + 3*d*x - 16))/24 - (a*tan(c/2 + (d*x)/2))/4 - (a*(c + d*x))/8 + tan(c/2 + (d*x)/2)^2*((a*(12*c + 12*d*x - 16))/24 - (a*(c + d*x) )/2) + tan(c/2 + (d*x)/2)^6*((a*(12*c + 12*d*x - 48))/24 - (a*(c + d*x))/2 ) + tan(c/2 + (d*x)/2)^4*((a*(18*c + 18*d*x - 48))/24 - (3*a*(c + d*x))/4) + (7*a*tan(c/2 + (d*x)/2)^3)/4 - (7*a*tan(c/2 + (d*x)/2)^5)/4 + (a*tan(c/ 2 + (d*x)/2)^7)/4)/(d*(tan(c/2 + (d*x)/2)^2 + 1)^4)